<div class="sub-page-wrapper">
    <nz-row nzGutter="8">
        <nz-col nzSpan="12">
            <div class="layout-sub-page">
                <div class="table-action">
                    <div class="left-operate">
                        <nz-space [nzSize]='8'>
                            <input
                                    *nzSpaceItem
                                    [style]='{width: "180px"}'
                                    nz-input
                                    placeholder="字典名称"
                                    [(ngModel)]='searchObj.dictName'
                                    (keyup)='keyEnter($event)'
                            />
                            <input
                                    *nzSpaceItem
                                    [style]='{width: "180px"}'
                                    nz-input
                                    placeholder="字典类型"
                                    [(ngModel)]='searchObj.dictType'
                                    (keyup)='keyEnter($event)'
                            />
                            <button
                                    *nzSpaceItem
                                    nz-button
                                    nz-tooltip
                                    [nzTooltipTitle]="'搜索'"
                                    [nzTooltipPlacement]="'top'"
                                    (click)='tableComponent.list()'
                            >
                                <i nz-icon nzType="search"></i>
                            </button>
                            <button
                                    *nzSpaceItem
                                    nz-button
                                    nz-tooltip
                                    [nzTooltipTitle]="'重置'"
                                    [nzTooltipPlacement]="'top'"
                                    (click)='resetSearchObject()'
                            >
                                <span nz-icon >重置</span>
                            </button>
                        </nz-space>
                    </div>
                    <div class="right-operate">
                        <button
                                nz-button
                                nz-tooltip
                                [nzTooltipTitle]=""
                                [nzTooltipPlacement]="'top'"
                                (click)="dictTypeOptionComponent.onModalOpen('')"
                        >
                            <i nz-icon nzType="plus"></i>
                            新增
                        </button>
                    </div>
                </div>
                <app-table
                    #tableComponent
                    [tableKey]='"dictId"'
                    [tableColumnArray]='dictTypeColumnArray'
                    [dataService]='dictTypeService'
                    [optionModelList]='optionModelList'
                    (optionEvent)='optionEvent($event)'
                    [searchObj]='searchObj'
                    (rowClickEvent)="ditTypeSelect($event)"
                ></app-table>
            </div>
        </nz-col>
        <nz-col nzSpan="12">
            <div class="layout-sub-page">
                <div class="table-action">
                    <div class="left-operate">
                        <nz-space [nzSize]='8'>
                            <input
                                    *nzSpaceItem
                                    [style]='{width: "180px"}'
                                    nz-input
                                    placeholder="字典标签"
                                    [(ngModel)]='subSearchObj.dictLabel'
                                    (keyup)='subkeyEnter($event)'
                            />


                            <button
                                    *nzSpaceItem
                                    nz-button
                                    nz-tooltip
                                    [nzTooltipTitle]="'搜索'"
                                    [nzTooltipPlacement]="'top'"
                                    (click)='subTableComponent.list()'
                            >
                                <i nz-icon nzType="search"></i>
                            </button>
                            <button
                                    *nzSpaceItem
                                    nz-button
                                    nz-tooltip
                                    [nzTooltipTitle]="'重置'"
                                    [nzTooltipPlacement]="'top'"
                                    (click)='resetSearchObject()'
                            >
                                <span nz-icon >重置</span>
                            </button>
                        </nz-space>
                    </div>
                    <div class="right-operate">
                        <button
                                *ngIf="subSearchObj.dictType"
                                nz-button
                                nz-tooltip
                                [nzTooltipTitle]=""
                                [nzTooltipPlacement]="'top'"
                                (click)="dictDataOptionComponent.onModalOpen('', subSearchObj.dictType)"
                        >
                            <i nz-icon nzType="plus"></i>
                            新增
                        </button>
                    </div>
                </div>

                <app-table
                    #subTableComponent
                    [tableKey]='"dictCode"'
                    [tableColumnArray]='dictDataColumnArray'
                    [dataService]='dictDataService'
                    [optionModelList]='subOptionModelList'
                    (optionEvent)='subOptionEvent($event)'
                    [searchObj]='subSearchObj'
                ></app-table>
            </div>
        </nz-col>
    </nz-row>
</div>


<app-dict-type-option #dictTypeOptionComponent [tableComponent]='tableComponent'></app-dict-type-option>
<app-dict-data-option #dictDataOptionComponent [tableComponent]='subTableComponent'></app-dict-data-option>
